ceturtdiena, 2022. gada 26. maijs

SweetHome3D HTML5 to Blender importer java home 3d editor


the video is just for gig, app allows You to export to .obj files which can be imported in blender, to export later to .glb which can be used in Your javascript/other video game. (remember to chmod 777 the app)

piektdiena, 2022. gada 6. maijs

Drawing virtual grass in self drawn shapes (shapes to code with added tufts) (UPDATED 23.MAY 2022) DOES NOT WORK, BUT GREAT IDEA.

Code - https://paste-bin.xyz/56075
add https://threejs.org/ threex.grass.js

more -   https://github.com/jeromeetienne/threex.grass#:~:text=grass%20is%20a%20three.,Blades%20of%20Waving%20Grass%22%20GPUGem.


WHAT SHOULD BE IMPLEMENTED - ALL NEEDED FORMS (RECTANGULAR, CIRCLE), AS MANY SHAPES AS POSSIBLE.

my code example of drawing lines in javascript - https://paste-bin.xyz/56557

how idea will be implemented - getting all points on line in array, use them as limits for "tufts" used in code on github.



here  is pastebin to following code - https://pastebin.pl/view/ecce6d36


<html>
<head>
<meta charset=utf-8 />
<title>Draw a rectangular shape</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

</head>

<p>Drag to draw lines</p>
<canvas id="canvas" width=900 height=900></canvas>
<br/>
<button id="clear">Clear Canvas</button>


<br><br>
<button  onclick="spitoutcode();" type="button">Spitout code!</button>

<div id="listes2"></div>
<div id="listes"></div>



<div id="new">
<!--
<p id="p1">Tutorix</p>
<p id="p2">Tutorialspoint</p>
-->
</div>


<script>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var canvasOffset = $("#canvas").offset();
var offsetX = canvasOffset.left;
var offsetY = canvasOffset.top;
var storedLines = [];
var startX = 0;
var startY = 0;
var isDown;
console.log("stored", storedLines);

//let counter = 0;
//for (let i = 0; i < storage.length; i++) {
  //if (storage[i].status === '0') counter++;
//}


//var animals = [];
//setInterval(function (){
//console.log(storedLines.lenght);
//console.log(storedLines);

//}, 300);


//for(i=0; i<storedLines.lenght; i++){
//const kopa = animals.push(storedLines[i]);
//console.log("zbisj", kopa);

//}

//console.log(storedLines);


var x = [];
console.log(x);


ctx.strokeStyle = "orange";
ctx.lineWidth = 3;

$("#canvas").mousedown(function(e) {
  handleMouseDown(e);
});
$("#canvas").mousemove(function(e) {
  handleMouseMove(e);
});
$("#canvas").mouseup(function(e) {
  handleMouseUp(e);
});
$("#clear").click(function() {
  storedLines.length = 0;
  redrawStoredLines();
});








function handleMouseDown(e) {

  var mouseX = parseInt(e.clientX - offsetX);
  var mouseY = parseInt(e.clientY - offsetY);
  isDown = true;
  
    const lastItem = storedLines.slice(-1).pop();
var count = storedLines. length;
if(lastItem){

if(count > 0){
  startX = lastItem.x2;
  startY = lastItem.y2;
} else {
  startX = mouseX;
  startY = mouseY;
}
} else {
  startX = mouseX;
  startY = mouseY;
}
  console.log("x", startX);
  console.log("y", startY);

}





function handleMouseMove(e) {
  if (!isDown) {
    return;
  }
  redrawStoredLines();
  var mouseX = parseInt(e.clientX - offsetX);
  var mouseY = parseInt(e.clientY - offsetY);
  // draw the current line
  ctx.beginPath();
  ctx.moveTo(startX, startY);
  ctx.lineTo(mouseX, mouseY);
  ctx.stroke();
}



 var list = [];
var list2 = [];
function handleMouseUp(e) {
  isDown = false;
  var mouseX = parseInt(e.clientX - offsetX);
  var mouseY = parseInt(e.clientY - offsetY);
  
  
  
  
  
  
  
  
  var cipars;
    if(mouseY + 9 == storedLines[0] ){
cipars = 9;
}
    if(mouseY + 8 == storedLines[0]){
cipars = 8;
}
if(mouseY + 7 == storedLines[0]){
cipars = 7;
}
   if(mouseY + 6 == storedLines[0]){
   cipars = 6;
  }
  if(mouseY + 5 == storedLines[0]){
  cipars = 5;
}
if(mouseY + 4 == storedLines[0]){
cipars = 4;
}
 
    if(mouseY + 3 == storedLines[0]){
cipars = 3;
}
     if(mouseY + 2 == storedLines[0]){
cipars = 2;
 }
     if(mouseY + 1 == storedLines[0]){
cipars = 1;
}
////ja mouse up ir tuvu pirmajam elementam pieskaistīt velvienu līniju kas savienos punktus kurus šķir 2 punkti
  if(mouseY + 9 == storedLines[0] || mouseY + 8 == storedLines[0] || mouseY + 7 == storedLines[0] ||
   mouseY + 6 == storedLines[0] || mouseY + 5 == storedLines[0] || mouseY + 4 == storedLines[0] ||
    mouseY + 3 == storedLines[0] || mouseY + 2 == storedLines[0] || mouseY + 1 == storedLines[0]){
  
    list2.push(mouseY + cipars);

}
  //}
  
  
  var cipars2;
    if(mouseX + 9 == storedLines[0] ){
cipars = 9;
}
    if(mouseX + 8 == storedLines[0]){
cipars = 8;
}
if(mouseX + 7 == storedLines[0]){
cipars = 7;
}
   if(mouseX + 6 == storedLines[0]){
   cipars = 6;
  }
  if(mouseX + 5 == storedLines[0]){
  cipars = 5;
}
if(mouseX + 4 == storedLines[0]){
cipars = 4;
}
 
    if(mouseX + 3 == storedLines[0]){
cipars = 3;
}
     if(mouseX + 2 == storedLines[0]){
cipars = 2;
 }
     if(mouseX + 1 == storedLines[0]){
cipars = 1;
}
////ja mouse up ir tuvu pirmajam elementam pieskaistīt velvienu līniju kas savienos punktus kurus šķir 2 punkti
  if(mouseX + 9 == storedLines[0] || mouseX + 8 == storedLines[0] || mouseX + 7 == storedLines[0] ||
   mouseX + 6 == storedLines[0] || mouseX + 5 == storedLines[0] || mouseX + 4 == storedLines[0] ||
    mouseX + 3 == storedLines[0] || mouseX + 2 == storedLines[0] || mouseX + 1 == storedLines[0]){
  
    list.push(mouseX + cipars);

}














  //}
  
  
  
  storedLines.push({
    x1: startX,
    y1: startY,
    x2: mouseX,
    y2: mouseY
  });
  
  
  
  
  
  
  
  
  
 
for (var i = startX; i <= mouseX; i++) {
    list.push(i);
}
  
  
for (var i = startY; i <= mouseY; i++) {
    list2.push(i);
}


  
  
  
  redrawStoredLines();
}


console.log("list" , list);
console.log("list2" , list2);


function spitoutcode(){

//foreach line create numbers in array, for every array element create html element and add content to it.


var len= storedLines. length;

//var list = storedLines;

//var test = 0;




for(i2=0; i2 < 25; i2++){

if(i2 != 0){
tit = "list" + i2;

} else {
tit = "list";

}
 //const div = document.createElement('listes');
 //const div2 = document.createElement('listes2');
  //div.className = 'row';
  //div2.className = 'row';
//skaitļus no 1 līdz 6 pēc tam no 6 līdz 12 un so on
  //div = '<p id="' + tit + '"></p>';
  //div2 = '<p id="' + tit2 + '"></p>';
    //document.getElementById('listes').appendChild(div);
    //document.getElementById('listes2').appendChild(div2);
    
    
     var tag = document.createElement("p");
   tag.setAttribute("id", tit);
   
   
     //var tag2 = document.createElement("p");
   //tag2.setAttribute("id", tit2);
   
  
   var element = document.getElementById("new");
   element.appendChild(tag);
   //element.appendChild(tag2);
    //var test++;
}




//creates html elements
for(i2=0; i2 < 71; i2++){

if(i2 != 0){
tit2 = "p" + i2;
} else {
tit2 = "p";
}
 //const div = document.createElement('listes');
 //const div2 = document.createElement('listes2');
  //div.className = 'row';
  //div2.className = 'row';
//skaitļus no 1 līdz 6 pēc tam no 6 līdz 12 un so on
  //div = '<p id="' + tit + '"></p>';
  //div2 = '<p id="' + tit2 + '"></p>';
    //document.getElementById('listes').appendChild(div);
    //document.getElementById('listes2').appendChild(div2);
    
    
     //var tag = document.createElement("p");
   //tag.setAttribute("id", tit);
   
   
     var tag2 = document.createElement("p");
   tag2.setAttribute("id", tit2);
   
  
   var element = document.getElementById("new");
   //element.appendChild(tag);
   element.appendChild(tag2);
    //var test++;
}



//creates html elements



//if(test > 0)


document.getElementById("list" + 1).innerHTML = " // var list =[";
document.getElementById("list" + 2).innerHTML = list;
document.getElementById("list" + 3).innerHTML = "];";


document.getElementById("list" + 4).innerHTML = " // var list2 =[";
document.getElementById("list" + 5).innerHTML = list2;
document.getElementById("list" + 6).innerHTML = "];";

 document.getElementById("list" + 7).innerHTML = " // var list3 =[";
document.getElementById("list" + 8).innerHTML = list;
document.getElementById("list" + 9).innerHTML = "];";
document.getElementById("list" + 10).innerHTML = " // var list4 =[";
document.getElementById("list" + 11).innerHTML = list2;
document.getElementById("list" + 12).innerHTML = "];";

 
 document.getElementById("list" + 13).innerHTML = " // var list5 =[";
document.getElementById("list" + 14).innerHTML = list;
document.getElementById("list" + 15).innerHTML = "];";
document.getElementById("list" + 16).innerHTML = " // var list6 =[";
document.getElementById("list" + 17).innerHTML = list2;
document.getElementById("list" + 18).innerHTML = "];";


 document.getElementById("list" + 19).innerHTML = " // var list7 =[";
document.getElementById("list" + 20).innerHTML = list;
document.getElementById("list" + 21).innerHTML = "];";
document.getElementById("list" + 22).innerHTML = " // var list8 =[";
document.getElementById("list" + 23).innerHTML = list2;
document.getElementById("list" + 24).innerHTML = "];";


document.getElementById("p" + 1).innerHTML = " //var nTufts = 15000";
document.getElementById("p" + 2).innerHTML = " ///var positions = new Array(nTufts) ";
document.getElementById("p" + 3).innerHTML = " //for(var i = 0; i < nTufts; i++){";
document.getElementById("p" + 4).innerHTML = " //var position = new THREE.Vector3()";
document.getElementById("p" + 5).innerHTML = " //position.x = (Math.random()-0.5)*20";
document.getElementById("p" + 6).innerHTML = " //position.z = (Math.random()-0.5)*20";
document.getElementById("p" + 7).innerHTML = " //if(list.includes(position.x) or list2.includes(position.y)){";
document.getElementById("p" + 8).innerHTML = " //positions[i] = position";
document.getElementById("p" + 9).innerHTML = " //};";
document.getElementById("p" + 10).innerHTML = " //}";
document.getElementById("p" + 11).innerHTML = " //}";
document.getElementById("p" + 12).innerHTML = " //var mesh = THREEx.createGrassTufts(positions)";
document.getElementById("p" + 13).innerHTML = " //scene.add(mesh)";
// load the texture
document.getElementById("p" + 14).innerHTML = "var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass01.png'";
document.getElementById("p" + 15).innerHTML = "var material = mesh.material";
document.getElementById("p" + 16).innerHTML = "material.map = THREE.ImageUtils.loadTexture(textureUrl)";
document.getElementById("p" + 17).innerHTML = "material.alphaTest = 0.7";



document.getElementById("p" + 18).innerHTML = " //var nTufts = 15000";
document.getElementById("p" + 19).innerHTML = " ///var positions = new Array(nTufts) ";
document.getElementById("p" + 20).innerHTML = " //for(var i = 0; i < nTufts; i++){";
document.getElementById("p" + 21).innerHTML = " //var position = new THREE.Vector3()";
document.getElementById("p" + 22).innerHTML = " //position.x = (Math.random()-0.5)*20";
document.getElementById("p" + 23).innerHTML = " //position.z = (Math.random()-0.5)*20";
document.getElementById("p" + 24).innerHTML = " //if(list3.includes(position.x) or list4.includes(position.y)){";
document.getElementById("p" + 25).innerHTML = " //positions[i] = position";
document.getElementById("p" + 26).innerHTML = " //};";
document.getElementById("p" + 27).innerHTML = " //}";
document.getElementById("p" + 28).innerHTML = " //}";
document.getElementById("p" + 29).innerHTML = " //var mesh = THREEx.createGrassTufts(positions)";
document.getElementById("p" + 30).innerHTML = " //scene.add(mesh)";
// load the texture
document.getElementById("p" + 31).innerHTML = "var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass02.png'";
document.getElementById("p" + 32).innerHTML = "var material = mesh.material";
document.getElementById("p" + 33).innerHTML = "material.map = THREE.ImageUtils.loadTexture(textureUrl)";
document.getElementById("p" + 34).innerHTML = "material.alphaTest = 0.7";
 

document.getElementById("p" + 35).innerHTML = " //var nTufts = 15000";
document.getElementById("p" + 36).innerHTML = " ///var positions = new Array(nTufts) ";
document.getElementById("p" + 37).innerHTML = " //for(var i = 0; i < nTufts; i++){";
document.getElementById("p" + 38).innerHTML = " //var position = new THREE.Vector3()";
document.getElementById("p" + 39).innerHTML = " //position.x = (Math.random()-0.5)*20";
document.getElementById("p" + 40).innerHTML = " //position.z = (Math.random()-0.5)*20";
document.getElementById("p" + 41).innerHTML = " //if(list5.includes(position.x) or list6.includes(position.y)){";
document.getElementById("p" + 42).innerHTML = " //positions[i] = position";
document.getElementById("p" + 43).innerHTML = " //};";
document.getElementById("p" + 44).innerHTML = " //}";
document.getElementById("p" + 45).innerHTML = " //}";
document.getElementById("p" + 46).innerHTML = " //var mesh = THREEx.createGrassTufts(positions)";
document.getElementById("p" + 47).innerHTML = " //scene.add(mesh)";
// load the texture
document.getElementById("p" + 48).innerHTML = "var material = mesh.material";
document.getElementById("p" + 49).innerHTML = "var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers01.png'";
document.getElementById("p" + 50).innerHTML = "material.map = THREE.ImageUtils.loadTexture(textureUrl)";
document.getElementById("p" + 51).innerHTML = "material.emissive.set(0x888888)";
document.getElementById("p" + 52).innerHTML = "material.alphaTest = 0.7";

document.getElementById("p" + 53).innerHTML = " //var nTufts = 15000";
document.getElementById("p" + 54).innerHTML = " ///var positions = new Array(nTufts) ";
document.getElementById("p" + 55).innerHTML = " //for(var i = 0; i < nTufts; i++){";
document.getElementById("p" + 56).innerHTML = " //var position = new THREE.Vector3()";
document.getElementById("p" + 57).innerHTML = " //position.x = (Math.random()-0.5)*20";
document.getElementById("p" + 58).innerHTML = " //position.z = (Math.random()-0.5)*20";
document.getElementById("p" + 59).innerHTML = " //if(list7.includes(position.x) or list8.includes(position.y)){";
document.getElementById("p" + 60).innerHTML = " //positions[i] = position";
document.getElementById("p" + 61).innerHTML = " //};";
document.getElementById("p" + 62).innerHTML = " //}";
document.getElementById("p" + 63).innerHTML = " //}";
document.getElementById("p" + 64).innerHTML = " //var mesh = THREEx.createGrassTufts(positions)";
document.getElementById("p" + 65).innerHTML = " //scene.add(mesh)";
// load the texture
// load the texture
document.getElementById("p" + 66).innerHTML = "var material = mesh.material";
document.getElementById("p" + 67).innerHTML = "var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers02.png'";
document.getElementById("p" + 68).innerHTML = "material.map = THREE.ImageUtils.loadTexture(textureUrl)";
document.getElementById("p" + 69).innerHTML = "material.emissive.set(0x888888)";
document.getElementById("p" + 70).innerHTML = "material.alphaTest = 0.7";









}


//spitoutcode();





function redrawStoredLines() {
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  if (storedLines.length == 0) {
    return;
  }
  // redraw each stored line
  for (var i = 0; i < storedLines.length; i++) {
    ctx.beginPath();
    ctx.moveTo(storedLines[i].x1, storedLines[i].y1);
    ctx.lineTo(storedLines[i].x2, storedLines[i].y2);
    ctx.stroke();
  }
}
</script>


</body>
</html>












the code that draws tufts of grass has this

for(var i = 0; i < nTufts; i++){
var position = new THREE.Vector3()
position.x = (Math.random()-0.5)*20
position.z = (Math.random()-0.5)*20
positions[i] = position
}

it would be cool if I could draw some line in code up in the article and use the array of drawn points to limit positions of tufts.





<!DOCTYPE html>
<script src='vendor/three.js/build/three.min.js'></script>
<script src='../threex.grass.js'></script>
<body style='margin: 0px; overflow: hidden;'><script>
var renderer = new THREE.WebGLRenderer({
antialias : true
});
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.setClearColor( 'lightblue', 1 );
document.body.appendChild( renderer.domElement );

var onRenderFcts= [];
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(20, window.innerWidth / window.innerHeight, 0.01, 100);
camera.position.z = 1;
camera.position.set(0, 1000, 0);      




setInterval(function (){
//console.log("x", camera.position.x);
//console.log("y", camera.position.y);
//console.log("z", camera.position.z);
camera.position.set(0, 50, 0);      

}, 300);




















//////////////////////////////////////////////////////////////////////////////////
// set 3 point lighting //
//////////////////////////////////////////////////////////////////////////////////

;(function(){
// add a ambient light
var light = new THREE.AmbientLight( 0x020202 )
scene.add( light )
// add a light in front
var light = new THREE.DirectionalLight('white', 1)
light.position.set(0.5, 0.5, 2)
scene.add( light )
// add a light behind
var light = new THREE.DirectionalLight('white', 0.75)
light.position.set(-0.5, -0.5, -2)
scene.add( light )
})()
//// add a light behind
//var light = new THREE.DirectionalLight('white', 1)
//// var light = new THREE.PointLight('white', 2)
//scene.add( light )
//light.position.y= 1
//onRenderFcts.push(function(delta, now){
//var angle = now*Math.PI*2 * 0.2
//light.position.x= Math.cos(angle)*3
//light.position.y= Math.sin(angle)*3
//// light.position.z= Math.sin(angle)*3
//})
////////////////////////////////////////////////////////////////////////////////////
//// grass ground šito vajag figūrveidā //
////////////////////////////////////////////////////////////////////////////////////
//var textureUrl = 'images/grasslight-small.jpg'
//var texture = THREE.ImageUtils.loadTexture(textureUrl);
//texture.wrapS = THREE.RepeatWrapping;
//texture.wrapT = THREE.RepeatWrapping;
//texture.repeat.x= 10
//texture.repeat.y= 10
//texture.anisotropy = renderer.getMaxAnisotropy()

//// build object3d
//var geometry = new THREE.PlaneGeometry(20, 20)
//var material = new THREE.MeshPhongMaterial({
//map : texture,
//emissive: 'green',
//})
//var object3d = new THREE.Mesh(geometry, material)
//object3d.rotateX(-Math.PI/2)
//scene.add(object3d)
////////////////////////////////////////////////////////////////////////////////////
//// comment //
////////////////////////////////////////////////////////////////////////////////////

//var nTufts = 15000
//var positions = new Array(nTufts)
//for(var i = 0; i < nTufts; i++){
//var position = new THREE.Vector3()
//position.x = (Math.random()-0.5)*20
//position.z = (Math.random()-0.5)*20
//positions[i] = position
//}
//var mesh = THREEx.createGrassTufts(positions)
//scene.add(mesh)

//// load the texture
//var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass01.png'
//var material = mesh.material
//material.map = THREE.ImageUtils.loadTexture(textureUrl)
//material.alphaTest = 0.7

////////////////////////////////////////////////////////////////////////////////////
//// comment //
////////////////////////////////////////////////////////////////////////////////////
//var nTufts = 5000
//var positions = new Array(nTufts)
//for(var i = 0; i < nTufts; i++){
//var position = new THREE.Vector3()
//position.x = (Math.random()-0.5)*20
//position.z = (Math.random()-0.5)*20
//positions[i] = position
//}
//var mesh = THREEx.createGrassTufts(positions)
//scene.add(mesh)

//// load the texture
//var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass02.png'
//var material = mesh.material
//material.map = THREE.ImageUtils.loadTexture(textureUrl)
//material.alphaTest = 0.7
////////////////////////////////////////////////////////////////////////////////////
//// comment //
////////////////////////////////////////////////////////////////////////////////////
//var nTufts = 100
//var positions = new Array(nTufts)
//for(var i = 0; i < nTufts; i++){
//var position = new THREE.Vector3()
//position.x = (Math.random()-0.5)*20
//position.z = (Math.random()-0.5)*20
//positions[i] = position
//}
//var mesh = THREEx.createGrassTufts(positions)
//scene.add(mesh)

//// load the texture
//var material = mesh.material
//var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers01.png'
//material.map = THREE.ImageUtils.loadTexture(textureUrl)
//material.emissive.set(0x888888)
//material.alphaTest = 0.7
////////////////////////////////////////////////////////////////////////////////////
//// comment //
////////////////////////////////////////////////////////////////////////////////////
//var nTufts = 100
//var positions = new Array(nTufts)
//for(var i = 0; i < nTufts; i++){
//var position = new THREE.Vector3()
//position.x = (Math.random()-0.5)*20
//position.z = (Math.random()-0.5)*20
//positions[i] = position
//}
//var mesh = THREEx.createGrassTufts(positions)
//scene.add(mesh)

//// load the texture
//var material = mesh.material
//var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers02.png'
//material.map = THREE.ImageUtils.loadTexture(textureUrl)
//material.emissive.set(0x888888)
//material.alphaTest = 0.7
var list =[

275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728

];

 var list2 =[

101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,100,101,102

];

 var list3 =[

275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728

];

 var list4 =[

101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,100,101,102

];

 var list5 =[

275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728

];

 var list6 =[

101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,100,101,102

];

 var list7 =[

275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728

];

 var list8 =[

101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,100,101,102

];

var nTufts = 15000

var positions = new Array(nTufts)

for(var i = 0; i < nTufts; i++){

var position = new THREE.Vector3()

position.x = (Math.random()-0.5)*20

position.z = (Math.random()-0.5)*20

//console.log("liste", list);
//console.log("pozicija", position.x);


var roundedString = position.x.toFixed(0);
var roundedString2 = position.y.toFixed(0);

console.log("string", typeof(roundedString));
console.log("array", typeof(list));

listar = Object.values(list);
listar2 = Object.values(list2);
//position.x should be without commas

console.log("array99", listar);


if(listar.includes(roundedString) == false || listar2.includes(roundedString2 == false)){
console.log("notiek");

positions[i] = position

};

}

console.log("dope", positions);



var mesh = THREEx.createGrassTufts(positions)

scene.add(mesh)

var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass01.png'

var material = mesh.material

material.map = THREE.ImageUtils.loadTexture(textureUrl)

material.alphaTest = 0.7

var nTufts = 15000

var positions = new Array(nTufts)

for(var i = 0; i < nTufts; i++){

var position = new THREE.Vector3()

position.x = (Math.random()-0.5)*20

position.z = (Math.random()-0.5)*20


var roundedString3 = position.x.toFixed(0);
var roundedString4 = position.y.toFixed(0);

console.log("string", roundedString);

listar3 = Object.values(list3);
listar4 = Object.values(list4);


if(listar3.includes(roundedString3) == false || listar4.includes(roundedString4) == false){

positions[i] = position

};

}


var mesh = THREEx.createGrassTufts(positions)

scene.add(mesh)

var textureUrl = THREEx.createGrassTufts.baseUrl+'images/grass02.png'

var material = mesh.material

material.map = THREE.ImageUtils.loadTexture(textureUrl)

material.alphaTest = 0.7

var nTufts = 15000

var positions = new Array(nTufts)

for(var i = 0; i < nTufts; i++){

var position = new THREE.Vector3()

position.x = (Math.random()-0.5)*20

position.z = (Math.random()-0.5)*20


var roundedString5 = position.x.toFixed(0);
var roundedString6 = position.y.toFixed(0);

listar5 = Object.values(list);
listar6 = Object.values(list2);

if(listar5.includes(roundedString5) == false || listar6.includes(roundedString6) == false){

positions[i] = position

};

}



var mesh = THREEx.createGrassTufts(positions)

scene.add(mesh)

var material = mesh.material

var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers01.png'

material.map = THREE.ImageUtils.loadTexture(textureUrl)

material.emissive.set(0x888888)

material.alphaTest = 0.7

var nTufts = 15000

var positions = new Array(nTufts)

for(var i = 0; i < nTufts; i++){

var position = new THREE.Vector3()

position.x = (Math.random()-0.5)*20

position.z = (Math.random()-0.5)*20



var roundedString7 = position.x.toFixed(0);
var roundedString8 = position.y.toFixed(0);

listar7 = Object.values(list);
listar8 = Object.values(list2);

if(listar7.includes(roundedString7) == false || listar8.includes(roundedString8) == false){

positions[i] = position

};

}



var mesh = THREEx.createGrassTufts(positions)

scene.add(mesh)

var material = mesh.material

var textureUrl = THREEx.createGrassTufts.baseUrl+'images/flowers02.png'

material.map = THREE.ImageUtils.loadTexture(textureUrl)

material.emissive.set(0x888888)

material.alphaTest = 0.7

//////////////////////////////////////////////////////////////////////////////////
// Camera Controls //
//////////////////////////////////////////////////////////////////////////////////
var mouse = {x : 0, y : 0}
//document.addEventListener('mousemove', function(event){
//mouse.x = (event.clientX / window.innerWidth ) - 0.5
//mouse.y = (event.clientY / window.innerHeight) - 0.5
//}, false)
onRenderFcts.push(function(delta, now){
//camera.position.x += (mouse.x*2 - camera.position.x) * (delta*3)
//camera.position.y += (mouse.y*2 - camera.position.y) * (delta*3)
camera.lookAt( scene.position )
})


//////////////////////////////////////////////////////////////////////////////////
// render the scene //
//////////////////////////////////////////////////////////////////////////////////
onRenderFcts.push(function(){
renderer.render( scene, camera );
})
//////////////////////////////////////////////////////////////////////////////////
// loop runner //
//////////////////////////////////////////////////////////////////////////////////
var lastTimeMsec= null
requestAnimationFrame(function animate(nowMsec){
// keep looping
requestAnimationFrame( animate );
// measure time
lastTimeMsec = lastTimeMsec || nowMsec-1000/60
var deltaMsec = Math.min(200, nowMsec - lastTimeMsec)
lastTimeMsec = nowMsec
// call each update function
onRenderFcts.forEach(function(onRenderFct){
onRenderFct(deltaMsec/1000, nowMsec/1000)
})
})
</script></body>

trešdiena, 2022. gada 13. aprīlis

makehuman 3d object maker, creating buildings




in order to get animations - https://www.mixamo.com/#/ creating buildings - https://ranjian0.github.io/building_tools/

check this for mixing animation files on one - https://github.com/nilooy/character-animation-combiner

definetely make sure animation track names match code.
If anybody is interested in development of the game map - here are the blender project files on dropbox. Idea that blender created object files can contain textures does not work. Prolly need to "hardcode them in the javascript" part.

https://www.dropbox.com/s/dirnbh3zfo39bfh/outside_the_box.zip?dl=0

Any tips write to r.mazitis@gmail.com or hit me on twitter @lv88h

trešdiena, 2022. gada 30. marts

NVIDIA nerf graphics primitives also 2d images to 3d (TRY MESHROOM INSTEAD!)

NVIDIA thing really does not work well, trying meshroom has better  output, my advice would be downloading some sort of 3d scanner app for phone, make dataset of images of the object, copy images to pc, download background remover - https://github.com/nadermx/backgroundremover or use green screen. create .obj file, degrade vertices and use it.



https://github.com/lv88h/instant-ngp

So for this to work You have to have g++/gcc version 10. Cmake has to be set to use it. 

Later, might try to make up some 3d objects from pictures I could use for already made game code (implementation).









My code that could help idea - 


/opt/cmake-3.22.3-linux-x86_64/bin/cmake  -B build
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:15:13_PDT_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0




CMake Error in /home/ronalds/Desktop/GECKOS/instant-ngp/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
  CUDA_ARCHITECTURES is empty for target "cmTC_9c06a".


CMake Error in /home/ronalds/Desktop/GECKOS/instant-ngp/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
  CUDA_ARCHITECTURES is empty for target "cmTC_9c06a".


CMake Error at /opt/cmake-3.22.3-linux-x86_64/share/cmake-3.22/Modules/CMakeTestCUDACompiler.cmake:43 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:18 (PROJECT)



Build cuda_11.3.r11.3/compiler.29920130_0


the thing that builds -- 
/opt/cmake-3.22.3-linux-x86_64/bin/cmake  -B build


cmake --build build --config RelWithDebInfo -j 16



the thing that installs -- 
/opt/cmake-3.22.3-linux-x86_64/bin/cmake --build build --config RelWithDebInfo -j 16



update-alternatives --config gcc

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 50

nvcc --compiler-bindir=/usr/lib/gcc hello.cu -o hello


running nerf fox --

instant-ngp$ ./build/testbed --scene data/nerf/fox

otrdiena, 2022. gada 15. februāris

video game development 4 (updated 25.may 2022) kinda works with need of small fixes




https://enable3d.io/examples.html

 https://drive.google.com/file/d/1bcif6Iau33xugA8qgut8gtn5T3dgQnwQ/view?usp=sharing 




april 6. game.php file - https://pastebin.pl/view/aad6e4a3

changes: added text from chat appearing on screen, location updation still glitches...



changes: added few backend files to update new tables for chat inside the game, and also front end


8.march game.php file - https://pastebin.pl/view/0ca50d39

7.march game.php file - https://pastebin.pl/view/5bcc0e43


the thing works, kinda updates character and creates other characters, which also get updated. if Your character pushes other character coordinates still does not get updated, but that's a small fix I will prolly implement in few days. 

right now y coordinates of character does not get updated when jumping

(remember using correct database structures), once it be fixed to work at least minimally - will add more documentation.






personal opinion: this been tough for me, as I love video games and programming, but I always thought video game engines or music patterns should be more open to people choices to modify them for good reasoning. I respect everyone that worked on there games and sell them, it's just that, we need to maintain documentation for every thing so our future children will be able to do any job, including video game programming and modelling, besides doing things in reality, which should also be more documented. 








older code versions with some ideas -- 





22.feb (still not working) - 
 
problem -         update(time, delta, myMans, object) { // lai Viņš strādātu object subklasēm būtu jābūt pieejamām, object rodās pašā sākumā pie skin izvēles

if You want 22.feb version to work, besides fixing code Your should add row called "skin" on users table. Also, You can get .sql file for database in 20.feb version zip. file.




26.feb - game.php file - https://pastebin.pl/view/4f71c7c8


Problems: "Uncaught SyntaxError: missing ) after argument list"  for some reason code thinks, I'm missing paranthesis...


27.feb - game.php file - https://pastebin.pl/view/17d3ad63


Problems : no character? 

somehow ARRAY myMans have 4 items instead of 2.


getting array outside async function


https://pastebin.pl/view/5581af9f

turns out global arrays are defined in constructor.


28.feb - game is working, but character visualization is still missing, and jump seems to not work...





problems solution : 

                      this.myMans[i].add(this.myMans[0]);

should be same as  in original code

            this.man.add(man)

but we get 

THREE.Object3D.add: object can't be added as a child of itself.

enable3d.phaserExtension.0.25.0.min.js:1 THREE.Object3D.add: object not an instance of THREE.Object3D.


well
                      this.myMans[i] = new ExtendedObject3D()
this shoulda  create the object for every iteration.....






2.march - game.php file - https://pastebin.pl/view/dbaaf279



3.march - game.php file - https://pastebin.pl/view/0b485ff8

no errors but no character gets drawn.

ceturtdiena, 2022. gada 27. janvāris

video game development 2



https://drive.google.com/file/d/1atiTldKCQRdk8jI45I41zU4eSowXFqLl/view

https://drive.google.com/file/d/1Vm7XiyTjvKRax3DEoLdCLfxyvpaw3tfx/view


nautilus grouping panel to dash

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-locations false



Ubuntu Tips: How To Launch Applications Automatically During Startup

  • Step 1: Go to “Startup Application Preferences” in Ubuntu. Go to System -> Preferences -> Startup Application, which will display the following window. ...
  • Step 2: Add the startup program.