• Content Count

  • Joined

  • Last visited

  1. OK, thanks @Sebavan incidentally, At first I used one webgl(babylonjs) and another canvas-2d(spine-canvas). It looks like to share texture cache. in this case, canvas-2d logic has just redrawing with HTMLImageElement.
  2. Hello, maybe this frequently required about preview dialog. like when shows character preview in a dialog or popup ui with new canvas. but i couldn't find the related post. in my case, not a full screen game it's web application. so, required multiple scenes for a dialog. BABYLONJS AssetsManager constructor needs a scene. and can not reuse these loaded textures with another scene in normal. when reused, it shows error like 'bindTexture: object not from this context' Is that possible to reuse loaded textures in another canvas with new scene? I don't want to request duplicated texture assets. thanks.
  3. Hello, @Rodrix3 made sample below. https://codepen.io/klaude/pen/pZpBOz?editors=1010 ignore before thread. had some misunderstanding. good luck!
  4. Hello, @Rodrix3 Maybe you have also some logics in engine.runRenderLoop function callback. In my case like this example. var capturer = new CCapture( { format: 'webm', framerate: 30 } ); function _render() { // some logics... scene.render(); } engine.runRenderLoop(_render.bind(this)); // stop render loop and capture function record() { scene.getEngine().stopRenderLoop(); render(); } // recording: call scene.render function and capture in loop function render() { requestAnimationFrame(function() { scene.render(); capturer.capture(scene.getEngine().getRenderingCanvas()); render(); }); } // and finally when to stop recording, call capturer.stop(); capturer.save(); i tested until this but for more exactly at last, you may should stop requestAnimationFrame in render() and call engine.runRenderLoop again. and can't tell you its time sync is exactly right but looks fine.
  5. Hello @Sebavan and @Deltakosh Thanks for your efforts https://github.com/BabylonJS/Extensions/tree/master/GIFExporter/examples/basic there is no example.js so i'm just trying using js files in 'dist'. Script tag and code like new GIFCreator(scene.getEngine()); it shows GIFCreator not found error. how to fix it it's available?
  6. Hi @aWeirdo if engine's target fps is 60 then every scene.render() is render after 1/60s. so setTimeout function's millisecs parameter do not affect rendering video speed. right? still it doesn't work as what i think. :( Sebavan's new solution is genius thing, i cannot approach near around it.
  7. Hello, found this solution for creating video. but this result video is faster than runtime animation. thought that _alpha variable usage is strange, so tried milliseconds controls but not easy for me. in my opinion every 1000/fps milliseconds, to render and to capture are correct. but it makes more speedy video any advice? ps. i solved using CCapture. but video quality is not good. function record() { scene.getEngine().stopRenderLoop(); render() } function render() { requestAnimationFrame(function() { scene.render(); capturer.capture(scene.getEngine().getRenderingCanvas()); render(); }); }
  8. klaude

    alphaIndex occurs depth problem.

    It was fully my newbie-like mistake about js array sort function... Thank you @sable
  9. klaude

    alphaIndex occurs depth problem.

    Hello, @sable based on camera distance is basic logic, so it works. but i have to order meshes with my logic not based on camera distance. it changes orders like https://www.babylonjs-playground.com/#BTU1J7#4 i'm trying to it runs like 2d which is parallel on screen not camera; i think that although alphaIndex is changed, camera distance logic runs last. so it makes blinking. but it's ok on safari browser. please anybody check this out. thanks.
  10. klaude

    alphaIndex occurs depth problem.

    hmmm, in my case. It shows blink and not ordered correctly. Tested chrome on macOS and Windows 10. what's your browser?
  11. klaude

    alphaIndex occurs depth problem.

    Hello, I have to control depth of meshes with alphaIndex in my situation. but when meshes are over 10, rendering gets strange. https://www.babylonjs-playground.com/#BTU1J7#1 need your help. thanks.
  12. klaude

    SceneOptimizer instance has empty

    It has no error. Maybe it works for now. It shows 'success'. BABYLON.SceneOptimizer.OptimizeAsync(scene, optimizerOptions(), function() { console.log('success'); }, function() { console.log('failed'); }); Thanks! @Arte
  13. Hello, I'm trying to use SceneOptimizer wity babylonjs v3.1.1. var options = new BABYLON.SceneOptimizerOptions(30, 1000); options.optimizations.push(new BABYLON.RenderTargetsOptimization(0)); options.optimizations.push(new BABYLON.ParticlesOptimization(1)); options.optimizations.push(new BABYLON.TextureOptimization(1, 1024)); // options.optimizations.push(new BABYLON.HardwareScalingOptimization(2, 4)); // Optimizer var optimizer = new BABYLON.SceneOptimizer(scene, options); optimizer.start(); but optimizer object has nothing. this is console log. e {} __proto__: Object what am i missing?
  14. Hello, RaananW. Thanks for your help. forgot to state linkOffsetX, linkOffsetY of GUI.Control. Using parenting function, It works what i want. but only when it comes to mesh. (yellow one) how to make sprite like plane2 in the next example. https://www.babylonjs-playground.com/#87HQN6#2
  15. Hello, guys. I'm newbie on 3d programming. I want to display sprite like GUI that has a function linkWithMesh. but it hasn't. In this example, sprite's position from a mesh is changing, not fixed. https://www.babylonjs-playground.com/#87HQN6 the mesh must have BILLBOARDMODE_ALL. how to make sprite to track mesh's position like GUI's linkWithMesh.