article thumbnail

Get node's 3d-mesh size?

Cocos

That’s the code I need! For others to get node’s mesh size function getNodeMeshSize(node) { const halfExtents = node.getComponent(MeshRenderer).model.modelBounds.halfExtents; Thanks so much! model.modelBounds.halfExtents; return halfExtents.clone().multiplyScalar(2); multiplyScalar(2); }

Mesh 40
article thumbnail

How to color triangels in custom Mesh?

Cocos

seems does’t work, my sample code below. colors.push( color ); colors.push( color); colors.push( color); } let mesh = cc.utils.createMesh({ positions : positions, indices : indices, doubleSided : true, colors: colors}); let comp = node.addComponent(cc.MeshRenderer); comp.mesh = mesh; positions[i + 1] = pos.y;

Mesh 40
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Nearing the Finish Line: Rewriting the Untold Engine

Harold Serrano

After months of coding, tweaking, and testing, I’m thrilled to share that the rewrite is almost done. Components: The data attached to entities, like meshes, physics, or animations. This modular approach keeps everything clean and efficient, allowing developers to focus on their game logic instead of wrestling with tangled code.

Engine 69
article thumbnail

How The Pokémon Company International Orchestrates Zero-Downtime Deployments for Pokémon TCG Live – Part 1

AWS Games

This blog post describes the journey of how TPCi uses Amazon ECS , AWS App Mesh , AWS Step Functions and AWS Lambda to achieve seamless zero-downtime deployments. Additionally, the configuration for the Envoy Front Proxy was managed manually in a separate code repository and deployed via AWS CloudFormation.

Mesh 60
article thumbnail

The Spine Animation Story at Logic Simplified

Logic Simplified

Through animation tools and code, each of the parts can be moved independently and the character animated. Each image part was converted to mesh. The USP of Spine animation software is how smoothly it converts an image part to mesh. In each mesh vertices are placed to define how we want to move the character.

Animation 116
article thumbnail

Object Placement on Terrain (Mesh)

Mnenad

This chapter is all about how I solved it (so far) to be able to place all kinds of assets like 3D-meshes or self-growing fractal seeds on the terrain. The code calculates Instantiations (spawning assets with the given parameters), which is quite heavy for the system to calculate. Before we start.   Tutorial time again.

Terrain 52
article thumbnail

Practical Tips for Optimizing Ray Tracing

Nvidia

This starts from mesh instance selection and their data. This starts from mesh instance selection and their data processing towards optimized tracing and shading of every hit that you encounter. Parallel mesh processing for instance data generation. Each instance alone requires 64 bytes of memory. Batched vertex data processing.