Skip to content

Commit

Permalink
additional tweaks / mouse cursor under the radar
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Nov 23, 2024
1 parent c3dbd4f commit fd2a949
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 1 addition & 11 deletions VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,7 @@ new ChuGL v0.2.4 (see ChuGL release notes below)
(previously, this would cause a crash in some cases)
(fixed) vec2/vec3/vec4 function call from literal (non-variable) value
(e.g., @(1,0).magnitude(); previously this yielded a compiler error)
(added) new `MouseCursor` class for quickly accessing mouse cursor:
// absolute screen coordinate of cursor
vec2 MouseCursor.xy();
// scaled coordinates in range [0,1]
vec2 MouseCursor.scaled();
(see API reference for more information)
https://chuck.stanford.edu/doc/reference/io.html#MouseCursor
(added) new `Mousor` class; `Mousor` is functionally equivalent to `MouseCursor`,
purely made for those prefer slightly less typing and slightly more chaos!
(added) examples/hid/mouse-cursor.ck
examples/stk/tubebell-algo5.ck
(added) examples/stk/tubebell-algo5.ck
(added) vector dot product methods for vec2, vec3, and vec4
float vec2.dot( vec2 rhs )
float vec3.dot( vec3 rhs )
Expand Down
12 changes: 12 additions & 0 deletions src/core/chuck_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,18 @@ t_CKBOOL init_class_HID( Chuck_Env * env )
type_engine_import_class_end( env );
*/

// RELEASE NOTES for when we are ready
// (added) new `MouseCursor` class for quickly accessing mouse cursor:
// // absolute screen coordinate of cursor
// vec2 MouseCursor.xy();
// // scaled coordinates in range [0,1]
// vec2 MouseCursor.scaled();
// (see API reference for more information)
// https://chuck.stanford.edu/doc/reference/io.html#MouseCursor
// (added) new `Mousor` class; `Mousor` is functionally equivalent to `MouseCursor`,
// purely made for those prefer slightly less typing and slightly more chaos!
// (added) examples/hid/mouse-cursor.ck

// init MouseCursor class | 1.5.4.2 (ge & spencer) added
if( !type_engine_import_class_begin( env, "MouseCursor", "Object",
env->global(), MouseCursor_ctor, MouseCursor_dtor,
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/ckdoc/gen-all.ck
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ doc.addGroup(
doc.addGroup(
[ "IO", "FileIO", /* "StdOut", "StdErr", */
"OscIn", "OscOut", "OscMsg",
"Hid", "HidMsg", "MouseCursor", "Mousor", "KBHit", "SerialIO",
"Hid", "HidMsg", /* "MouseCursor", "Mousor", */ "KBHit", "SerialIO",
"MidiIn", "MidiOut", "MidiMsg", "MidiFileIn" ],
// group name
"Input & Output",
Expand Down

0 comments on commit fd2a949

Please sign in to comment.