-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
523 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG] ___ doesn't work" | ||
labels: bug | ||
assignees: raub | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. ___ | ||
2. ___ | ||
3. ___ | ||
|
||
**Expected behavior** | ||
Description of what you expected to happen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[FEAT] ____" | ||
labels: new | ||
assignees: raub | ||
|
||
--- | ||
|
||
**Describe the solution you'd like** | ||
Description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
Description of alternative solutions or features you've considered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Description | ||
<!-- A concise description of what the PR does. --> | ||
|
||
|
||
## Test Plan | ||
<!-- How can a reviewer test the changes included in this PR? --> | ||
1. | ||
2. | ||
3. | ||
|
||
|
||
## Checklist | ||
<!-- Ensure that your PR fulfills the following requirements --> | ||
- [ ] I've followed the code style. | ||
- [ ] I've tried running the code with my changes. | ||
- [ ] The docs and TS declarations are in sync with code changes. | ||
- [ ] (optional) I've added unit tests for my changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Code of Conduct | ||
|
||
We pledge to act and interact in ways that contribute to an open and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of unacceptable behavior: | ||
|
||
* The use of sexualized language or imagery | ||
* Trolling, insulting or derogatory comments | ||
* Public or private harassment | ||
* Publishing others' private information | ||
* Other unprofessional conduct | ||
|
||
## Enforcement | ||
|
||
Community leaders will remove, edit, or reject | ||
contributions that are not aligned to this Code of Conduct. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Contributing | ||
|
||
Bugs and enhancements are tracked as GitHub issues. | ||
|
||
## Issues | ||
|
||
* Use a clear and descriptive title. | ||
* Describe the desired enhancement / problem. | ||
* Provide examples to demonstrate the issue. | ||
* If the problem involves a crash, provide its trace log. | ||
|
||
## Pull Requests | ||
|
||
* Do not include issue numbers in the PR title. | ||
* Commits use the present tense (`"Add feature"` not `"Added feature"`). | ||
* Commits use the imperative mood (`"Move cursor to..."` not `"Moves cursor to..."`). | ||
* File System | ||
* Prefer kebab-lowercase (`my-dir/example-file-name.js`). | ||
* Place an empty `.keep` file to keep an empty directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
Latest major version. | ||
|
||
## Reporting a Vulnerability | ||
|
||
Email: luisblanco1337@gmail.com. | ||
|
||
Telegram: [luisblanco_0](https://t.me/luisblanco_0) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Init Node3D environment | ||
const three = require('three'); | ||
const { init, addThreeHelpers } = require('../..'); | ||
const { doc, gl, requestAnimationFrame } = init({ isGles3: true, isWebGL2: true, vsync: false }); | ||
addThreeHelpers(three, gl); | ||
|
||
// Three.js rendering setup | ||
const renderer = new three.WebGLRenderer(); | ||
const scene = new three.Scene(); | ||
const camera = new three.PerspectiveCamera(70, doc.w / doc.h, 0.2, 500); | ||
camera.position.z = 35; | ||
scene.background = new three.Color(0x333333); | ||
|
||
// Add scene lights | ||
scene.add(new three.AmbientLight(0xc1c1c1, 0.5)); | ||
const sun = new three.DirectionalLight(0xffffff, 2); | ||
sun.position.set(-1, 0.5, 1); | ||
scene.add(sun); | ||
|
||
// Original knot mesh | ||
const knotGeometry = new three.TorusKnotGeometry(10, 1.85, 256, 20, 2, 7); | ||
const knotMaterial = new three.MeshToonMaterial({ color: 0x6cc24a }); | ||
const knotMesh = new three.Mesh(knotGeometry, knotMaterial); | ||
scene.add(knotMesh); | ||
|
||
// A slightly larger knot mesh, inside-out black - for outline | ||
const outlineGeometry = new three.TorusKnotGeometry(10, 2, 256, 20, 2, 7); | ||
const outlineMaterial = new three.MeshBasicMaterial({ color: 0, side: three.BackSide });; | ||
const outlineMesh = new three.Mesh(outlineGeometry, outlineMaterial); | ||
knotMesh.add(outlineMesh); | ||
|
||
// Handle window resizing | ||
doc.addEventListener('resize', () => { | ||
camera.aspect = doc.w / doc.h; | ||
camera.updateProjectionMatrix(); | ||
renderer.setSize(doc.w, doc.h); | ||
}); | ||
|
||
// Called repeatedly to render new frames | ||
const animate = () => { | ||
requestAnimationFrame(animate); | ||
const time = Date.now(); | ||
knotMesh.rotation.x = time * 0.0005; | ||
knotMesh.rotation.y = time * 0.001; | ||
renderer.render(scene, camera); | ||
}; | ||
|
||
animate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.